package com.duguo.dynamicmvc.factory.processor.model;

import java.util.Map;

import javassist.CtClass;
import javassist.CtMethod;

import com.duguo.dynamicmvc.factory.ControllerBuilder;
import com.duguo.dynamicmvc.factory.ControllerFactory;
import com.duguo.dynamicmvc.factory.processor.Processor;
import com.duguo.dynamicmvc.factory.utils.ChangeOnceBoolean;

public interface ModelProcessor extends Processor{
	

	public void addModelBindCode(CtClass controllerCtClass, StringBuffer methodBody, CtClass modelCtClass, CtMethod controllerMethod, String returnText, ChangeOnceBoolean hasValidationException, ControllerBuilder controllerBuilder) throws Exception;

	public void createBindMethod(ControllerFactory controllerFactory, CtClass modelImplCtClass, Map<String, CtClass> getters, Map<String, CtClass> setters, CtMethod controllerMethod, Map<String,Object> staticObjects) throws Exception;


	public void makeDynamicViewModelImpl(ControllerFactory controllerFactory, Class modelCtClass, CtMethod controllerHandlerCtMethod) throws Exception;

	public CtClass makeControllerModelImpl(ControllerFactory controllerFactory, CtClass controllerCtClass, CtMethod controllerHandlerCtMethod, CtMethod controllerMethodCtMethod) throws Exception;

	public CtClass getControllerModelCtClass(String controllerClassName) throws Exception;

	public CtClass getStaticModelCtClass(String controllerClassName) throws Exception;

}
